#import "LuminousZephyrController.h"
        
#import "LuminousZephyrModel.h"
#import "LuminousZephyrCell.h"
#import "Masonry.h"

@interface LuminousZephyrController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *brilliancePathwayCollectionView;
@property (nonatomic, strong) NSMutableArray *umbraKaleidoscopeDataSource;

@end

@implementation LuminousZephyrController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self nebulaInfiniteConfiglayout];
	[self grasprequestData];
}


//: 获取数据模型
- (void)grasprequestData {
	
}

- (void)nebulaInfiniteConfiglayout {
    UICollectionViewFlowLayout *binaryNostalgiaJoyous = [[UICollectionViewFlowLayout alloc] init];
    binaryNostalgiaJoyous.minimumLineSpacing = 10;
    binaryNostalgiaJoyous.minimumInteritemSpacing = 10;
    binaryNostalgiaJoyous.itemSize = CGSizeMake(100, 100);
    binaryNostalgiaJoyous.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.brilliancePathwayCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:binaryNostalgiaJoyous];
    self.brilliancePathwayCollectionView.backgroundColor = UIColor.clearColor;
    self.brilliancePathwayCollectionView.delegate = self;
    self.brilliancePathwayCollectionView.dataSource = self;
    self.brilliancePathwayCollectionView.showsHorizontalScrollIndicator = NO;
    self.brilliancePathwayCollectionView.showsVerticalScrollIndicator = NO;
    [self.brilliancePathwayCollectionView registerClass:[LuminousZephyrCell class] forCellWithReuseIdentifier:NSStringFromClass([LuminousZephyrCell class])];
    
    [self.view addSubview:self.brilliancePathwayCollectionView];
    [self.brilliancePathwayCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)umbraKaleidoscopeDataSource {
	if (!_umbraKaleidoscopeDataSource) {
		_umbraKaleidoscopeDataSource = [NSMutableArray array];
	}
	return _umbraKaleidoscopeDataSource;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.umbraKaleidoscopeDataSource.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    LuminousZephyrCell *keyhole = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([LuminousZephyrCell class]) forIndexPath:indexPath];
    return keyhole;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
